From 908deb1bdc89065b98ddf6bc1ce3e7192d0b672a Mon Sep 17 00:00:00 2001 From: Cosimo Cecchi Date: Wed, 30 Dec 2015 10:51:14 -0800 Subject: [PATCH] widget: deprecate separator style properties They're not used in GTK anymore. Also remove them from the default theme. --- gtk/gtkwidget.c | 15 ++++++++++++--- gtk/theme/Adwaita/_common.scss | 10 ---------- gtk/theme/Adwaita/gtk-contained-dark.css | 4 ---- gtk/theme/Adwaita/gtk-contained.css | 4 ---- 4 files changed, 12 insertions(+), 21 deletions(-) diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c index 70e6dedfa8..a1dbdf8419 100644 --- a/gtk/gtkwidget.c +++ b/gtk/gtkwidget.c @@ -3566,13 +3566,16 @@ G_GNUC_END_IGNORE_DEPRECATIONS * configurable width and should be drawn using a box instead of a line. * * Since: 2.10 + * + * Deprecated: 3.20: Use CSS properties on the separator elements to style + * separators; the value of this style property is ignored. */ gtk_widget_class_install_style_property (klass, g_param_spec_boolean ("wide-separators", P_("Wide Separators"), P_("Whether separators have configurable width and should be drawn using a box instead of a line"), FALSE, - GTK_PARAM_READABLE)); + GTK_PARAM_READABLE|G_PARAM_DEPRECATED)); /** * GtkWidget:separator-width: @@ -3581,13 +3584,16 @@ G_GNUC_END_IGNORE_DEPRECATIONS * This property only takes effect if the "wide-separators" style property is %TRUE. * * Since: 2.10 + * + * Deprecated: 3.20: Use the standard min-width CSS property on the separator + * elements to size separators; the value of this style property is ignored. */ gtk_widget_class_install_style_property (klass, g_param_spec_int ("separator-width", P_("Separator Width"), P_("The width of separators if wide-separators is TRUE"), 0, G_MAXINT, 0, - GTK_PARAM_READABLE)); + GTK_PARAM_READABLE|G_PARAM_DEPRECATED)); /** * GtkWidget:separator-height: @@ -3596,13 +3602,16 @@ G_GNUC_END_IGNORE_DEPRECATIONS * This property only takes effect if the "wide-separators" style property is %TRUE. * * Since: 2.10 + * + * Deprecated: 3.20: Use the standard min-height CSS property on the separator + * elements to size separators; the value of this style property is ignored. */ gtk_widget_class_install_style_property (klass, g_param_spec_int ("separator-height", P_("Separator Height"), P_("The height of separators if \"wide-separators\" is TRUE"), 0, G_MAXINT, 0, - GTK_PARAM_READABLE)); + GTK_PARAM_READABLE|G_PARAM_DEPRECATED)); /** * GtkWidget:scroll-arrow-hlength: diff --git a/gtk/theme/Adwaita/_common.scss b/gtk/theme/Adwaita/_common.scss index 951d19aeb9..99b6d69648 100644 --- a/gtk/theme/Adwaita/_common.scss +++ b/gtk/theme/Adwaita/_common.scss @@ -1131,8 +1131,6 @@ headerbar { .header-bar-separator, & > GtkBox > separator.vertical { - -GtkWidget-wide-separators: true; - -GtkWidget-separator-width: 1px; border-width: 0 1px; border-image: linear-gradient(to bottom, transparentize($borders_color,1), @@ -2661,17 +2659,9 @@ scrolledwindow { //vbox and hbox separators separator { // always disable separators - // -GtkWidget-wide-separators: true; background: transparentize(black, 0.9); min-width: 1px; min-height: 1px; - - // Font and File button separators - button.file &.vertical, - button.font &.vertical { - // always disable separators - -GtkWidget-wide-separators: true; - } } /********* diff --git a/gtk/theme/Adwaita/gtk-contained-dark.css b/gtk/theme/Adwaita/gtk-contained-dark.css index 70b7b4f6c8..19723ac5b0 100644 --- a/gtk/theme/Adwaita/gtk-contained-dark.css +++ b/gtk/theme/Adwaita/gtk-contained-dark.css @@ -1632,8 +1632,6 @@ headerbar { .titlebar:not(headerbar) .header-bar-separator, .titlebar:not(headerbar) > GtkBox > separator.vertical, headerbar .header-bar-separator, headerbar > GtkBox > separator.vertical { - -GtkWidget-wide-separators: true; - -GtkWidget-separator-width: 1px; border-width: 0 1px; border-image: linear-gradient(to bottom, rgba(28, 31, 31, 0), #1c1f1f 30%, #1c1f1f 70%, rgba(28, 31, 31, 0) 100%) 0 1/0 1px stretch; } .titlebar:not(headerbar) .header-bar-separator:backdrop, .titlebar:not(headerbar) > GtkBox > separator.vertical:backdrop, @@ -3712,8 +3710,6 @@ separator { background: rgba(0, 0, 0, 0.1); min-width: 1px; min-height: 1px; } - button.file separator.vertical, button.font separator.vertical { - -GtkWidget-wide-separators: true; } /********* * Lists * diff --git a/gtk/theme/Adwaita/gtk-contained.css b/gtk/theme/Adwaita/gtk-contained.css index 50703a064c..779891171b 100644 --- a/gtk/theme/Adwaita/gtk-contained.css +++ b/gtk/theme/Adwaita/gtk-contained.css @@ -1632,8 +1632,6 @@ headerbar { .titlebar:not(headerbar) .header-bar-separator, .titlebar:not(headerbar) > GtkBox > separator.vertical, headerbar .header-bar-separator, headerbar > GtkBox > separator.vertical { - -GtkWidget-wide-separators: true; - -GtkWidget-separator-width: 1px; border-width: 0 1px; border-image: linear-gradient(to bottom, rgba(157, 157, 153, 0), #9d9d99 30%, #9d9d99 70%, rgba(157, 157, 153, 0) 100%) 0 1/0 1px stretch; } .titlebar:not(headerbar) .header-bar-separator:backdrop, .titlebar:not(headerbar) > GtkBox > separator.vertical:backdrop, @@ -3874,8 +3872,6 @@ separator { background: rgba(0, 0, 0, 0.1); min-width: 1px; min-height: 1px; } - button.file separator.vertical, button.font separator.vertical { - -GtkWidget-wide-separators: true; } /********* * Lists * -- 2.30.2